package com.three.mapper;

import com.three.entity.Inventory;
import com.three.vo.BaoSunVo;
import com.three.vo.KeyboardVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author 小袁啊
* @description 针对表【inventory】的数据库操作Mapper
* @createDate 2024-10-25 19:06:02
* @Entity com.three.entity.InventoryController
*/
public interface InventoryMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Inventory record);

    int insertSelective(Inventory record);

    Inventory selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Inventory record);

    int updateByPrimaryKey(Inventory record);

    List<Inventory> getAllInventory( KeyboardVO keyboardVO);

    //更新状态，同意
    int updateStateYes
    (@Param("invenid")Integer invenid,
     @Param("examtime")Date examtime,
     @Param("examstaffid")Integer examstaffid);

    //更新状态，驳回
    int updateStateNo
    (@Param("invenid")Integer invenid,
     @Param("examtime")Date date,
     @Param("remarks") String remarks,
     @Param("examstaffid")Integer examstaffid);

    //查询报损信息，状态为2
    List<Inventory> getAllBaoSunGoods(BaoSunVo keyboardVO);

    //检查是否有未审核的盘点单
    List<Inventory> selectByState();

    //添加盘点单 inventime盘点时间
    int insterInventory(Inventory inventory);
}
